home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12727 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Turbo C++ won't write 0Ah to file!?!?
  5. Date: Tue, 02 Apr 96 12:53:59 GMT
  6. Organization: none
  7. Message-ID: <828449639snz@genesis.demon.co.uk>
  8. References: <4jnpcg$nis@tribune.concentric.net> <4jph9f$fq9@bilbo.nask.org.pl>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4jph9f$fq9@bilbo.nask.org.pl>
  15.            flssoft@blue.maloka.waw.pl
  16.            "FLS" <flssoft@blue.maloka.waw.pl>
  17. " writes:
  18.  
  19. >Try to change a file open mode. 0x0A it is '\n' character. If you are
  20. >writing to a text file, '\n' is converted to "\r\n" string.In the
  21. >result you will have 0x0D 0x0A characters in the file. Note that the
  22. >mode in which is opened the file depends on arguments (const char*
  23. >mode), and if you do not give not 't' neither 'b', the mode depends on
  24. >_fmode global variable.
  25.  
  26. In standard C there is no such thing as 't' in the mode string - a stream
  27. is opened in text mode unless you specify 'b'. Therefore to be conforming
  28. _fmode must default to text mode on this particular implementation.
  29.  
  30. -- 
  31. -----------------------------------------
  32. Lawrence Kirby | fred@genesis.demon.co.uk
  33. Wilts, England | 70734.126@compuserve.com
  34. -----------------------------------------
  35.